//
//  LSZListOfMVTypes.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/9/5.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZListOfMVTypes.h"

@implementation LSZListOfMVTypes
-(id)initWithListOfMV :(NSDictionary *)diction
{
    self = [super init];
    if (self) {
        self.arrayData = [[NSMutableArray alloc]init];
        if ([[diction valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[diction valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![diction valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayData = diction[@"data"];
        NSMutableArray * mutArray = [[NSMutableArray alloc]init];
        for (NSDictionary * diction in arrayData) {
            LSZListOfMVTypesMg * mg = [[LSZListOfMVTypesMg alloc]init];

            if ([[diction allKeys] containsObject:@"lyrics"]) {
                mg.lyrics = NullStringjudgment(NSStr(diction[@"lyrics"]));
            }if ([[diction allKeys] containsObject:@"listens"]) {
                mg.listens = NullStringjudgment(NSStr(diction[@"listens"]));
            }if ([[diction allKeys] containsObject:@"id"]) {
                mg.id_id = NullStringjudgment(NSStr(diction[@"id"]));
            }if ([[diction allKeys] containsObject:@"listen_url"]) {
                mg.listen_url = NullStringjudgment(NSStr(diction[@"listen_url"]));
            }if ([[diction allKeys] containsObject:@"album_name"]) {
                mg.album_name = NullStringjudgment(NSStr(diction[@"album_name"]));
            }if ([[diction allKeys] containsObject:@"play_time"]) {
                mg.play_time = NullStringjudgment(NSStr(diction[@"play_time"]));
            }if ([[diction allKeys] containsObject:@"artist_name"]) {
                mg.artist_name = NullStringjudgment(NSStr(diction[@"artist_name"]));
            }if ([[diction allKeys] containsObject:@"name"]) {
                mg.name = NullStringjudgment(NSStr(diction[@"name"]));
            }if ([[diction allKeys] containsObject:@"hits"]) {
                mg.hits = NullStringjudgment(NSStr(diction[@"hits"]));
            }if ([[diction allKeys] containsObject:@"total_song"]) {
                mg.total_song = NullStringjudgment(NSStr(diction[@"total_song"]));
            }if ([[diction allKeys] containsObject:@"cover_url"]) {
                mg.cover_url = NullStringjudgment(NSStr(diction[@"cover_url"]));
            }if ([[diction allKeys] containsObject:@"total_album"]) {
                mg.total_album = NullStringjudgment(NSStr(diction[@"total_album"]));
            }
            [mutArray addObject:mg];
        }
        self.arrayData = mutArray;
    }
    return self;
}
@end
@implementation  LSZListOfMVTypesMg
@end
